package merchant.service;

import hackathon1212.ServletPojoAdapter;

import java.util.List;
import java.util.Map;

import merchant.dao.Merchant;
import merchant.dao.MerchantDAO;

public class MerchantSearch extends ServletPojoAdapter{

	/**
	 * 
	 */
	private static final long serialVersionUID = -5556229037376912109L;

	protected List<Merchant> getBusinessMethod(Map<String, String[]> params){		
		final String postcode = params.get("postCode")[0];
		if(postcode.length() >=3){
			return MerchantDAO.get().getByPostCode(postcode);
		} else {
			return null;
		}
	}


}
